<template>
  <nav>
    <ul>
      <router-link
        v-for="{to,label,icon} in footerTabs"
        :key="to"
        :to="to"
        tag="li"
        active-class="active"
      >
        <span>
          <svg width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
            <title>{{label}}</title>
            <g fill-rule="evenodd" v-html="icon" />
          </svg>
        </span>
        <span v-html="label"></span>
      </router-link>
    </ul>
  </nav>
</template>

<script>
import footerTabs from "../assets/jsons/footerTabs.json";
export default {
  components: {},
  props: {},
  data() {
    return {
      footerTabs
    };
  },
  watch: {},
  computed: {},
  methods: {},
  created() {},
  mounted() {}
};
</script>
<style lang="scss" scoped>
nav {
  display: block;
  ul {
    display: flex;
    margin: 0;
    padding: 0;
    li {
      list-style: none;
      flex-basis: auto;
      flex: 1;
      svg {
        width: 0.3rem;
        g {
          fill: #696969;
        }
      }
      &.active {
        color: red;
        svg {
          width: 0.3rem;
          g {
            fill: red;
          }
        }
      }
      span {
        display: block;
        text-align: center;
        height: 0.3rem;
        line-height: 0.4rem;
      }
    }
  }
}
</style>